﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplicationCultura.Clases;

namespace WebApplicationCultura.Pages
{
    public partial class detallesEvento : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpCookie cookie = new HttpCookie("idEvento");
            cookie = Request.Cookies["idEvento"];
            if (cookie != null)
            {
                culturaDataContext dcd = new culturaDataContext();
                var evento = from ev in dcd.EVENTOs where ev.ID_EVENTO == decimal.Parse(cookie.Value) select ev;
                this.Label1.Text = evento.First().NOMBRE_EVENTO;
            }
            else
            {
                Response.Write("<p>No encontrado</p>");

            }
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect("/Pages/eventos.aspx");
        }
    }
}